# -*- coding: utf-8 -*-
# @Time    : 2021/11/15 22:10
# @Author  : super
import time

def index():
	status = "200 OK"
	response_header = [("Server", "PWS2.0")]
	data = time.ctime()
	return status, response_header, data

def not_func():
	status = "400 Not Found"
	response_header = [("Server", "PWS2.0")]
	data = "400 Not Found"
	return status, response_header, data

def handle_request(env):
	request_path = env["request_path"]
	print("接收到的动态请求资源：", request_path)
	if request_path == "/index.html":
		result = index()
		return result
	else:
		result = not_func()
		return result